/* Copyright 203-2115 AtomWare Technology Pty Limited
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * 
 * The flowing information must be keep 
 * AbstractWorkflowEntry.java
 * appbasic
 * 2013年10月25日下午2:54:07
 * @author 屈甲康
 * QQ285799123
 * mailto:qujiakang@gmail.com
 */

package org.jackysoft.entity;





import org.jackysoft.annotations.Id;
import org.jackysoft.annotations.Transient;


public abstract class AbstractWorkflowRunner implements WorkflowRunner {

	private static final long serialVersionUID = 5027021798603447054L;
	protected String refname;	
	protected int state;
	protected long id = -1L;
    protected long startTime;
    protected long sendTime;

	public AbstractWorkflowRunner() {
	}

	public AbstractWorkflowRunner(String name) {
		this.refname = name;
	}
	

	@Override
	public void setLeaf(boolean leaf) {
	}

	@Override
	@Transient
	public boolean isLeaf() {
		return false;
	}	

	@Override
	public void setSort(int sort) {
	}

	@Override
	@Transient
	public int getSort() {
		return 0;
	}

	public void setId(long id) {
		this.id = id;
	}

	@Override
	
	@Id	
	public long getId() {
		return this.id;
	}

	@Override
	@Transient
	public boolean isInitialized() {
		return false;
	}

	public void setState(int state) {
		this.state = state;
	}

	@Override
	public int getState() {
		return state;
	}
	
	public String getRefname() {
		return refname;
	}

	public void setRefname(String refname) {
		this.refname = refname;
	}

	public long getStartTime() {
		return startTime;
	}

	public void setStartTime(long startTime) {
		this.startTime = startTime;
	}

	public long getSendTime() {
		return sendTime;
	}

	public void setSendTime(long sendTime) {
		this.sendTime = sendTime;
	}


}